package shapes.shapes2D.distribution.trigo 
{
	import samples.BaseSample;
	import shapes.shapes2D.Dot;
	
	/**
	 * @author Nicolas Barradeau
	 * http://en.nicoptere.net
	 */
	public class Cosine extends BaseSample
	{
		private var d:Dot;
		private var angle:Number;
		
		public function Cosine( angle:Number, amplitude:Number = 50, frequence:Number = 180 ) 
		{
			
			color = 0xFF0000;
			
			d = new Dot( 100, sh / 2 );
			//angle =  Math.PI/ 2;
			
			graphics.lineStyle( 0,color );
			graphics.moveTo( d.x, sh / 2 + Math.cos( angle ) * amplitude );
			
			var i:int; 
			for ( i = d.x; i < sw - 100; i++ )
			{
				graphics.lineTo( i, sh / 2 + Math.cos( angle ) * amplitude );
				angle += Math.PI / frequence;
			}
			
			
		}
		
	}

}